package com.bird.component.lang.common.exception

import java.lang.RuntimeException

class ServiceException: RuntimeException {
    val data:Any?
    val status: Int
    override val message: String

    constructor(msg: String, status: Int = StatusInfo.BUSINESS_ERROR.status(), data:Any? = null) {
        this.status = status
        this.message = msg
        this.data = data
    }

    constructor(statusInfo: IStatusInfo) {
        this.status = statusInfo.status()
        this.message = statusInfo.message()
        this.data = null
    }


}